import React from 'react';
import { ModalForm,ProFormRadio, ProFormText, ProFormUploadButton} from "@ant-design/pro-form";
import {message, Radio} from "antd";
const MyComponent = (props) => {
  const {isedit,issetEdit,showData} = props
  console.log(showData);
  return (
    <ModalForm<{
      name: string;
      company: string;
    }>
      visible={isedit}
      modalProps={ {
        onCancel:() => {issetEdit(false)}
      } }
      onFinish={async (values) => {
        console.log(values.name);
        message.success('提交成功');
        return issetEdit(false);
      }}
    >

        <ProFormUploadButton
          name="upload"
          label="商城用户"
          max={2}
          fieldProps={ {
            name: 'file',
            listType: 'picture-card'
          }}
          action="/upload.do"
        />
        <ProFormText
          label='所属提货点'
          tooltip="所属提货点"
          initialValue={showData}
        />
        <ProFormText
          label='核销员名称'
          tooltip="核销员名称"
          initialValue={123}
        />
        <ProFormText
          name="phone"
          label='手机号码'
          tooltip="手机号码"
          placeholder='手机号码'
        />
        <ProFormRadio.Group
          label="核销开关"
          tooltip="核销开关"
        >
          <Radio.Group defaultValue={1}>
            <Radio value={1}>开启</Radio>
            <Radio value={2}>关闭</Radio>
          </Radio.Group>
        </ProFormRadio.Group>
        <ProFormRadio.Group
          label="状态"
          tooltip="状态"
        >
          <Radio.Group defaultValue={1}>
            <Radio value={1}>开启</Radio>
            <Radio value={2}>关闭</Radio>
          </Radio.Group>
        </ProFormRadio.Group>
    </ModalForm>
  );
};

export default MyComponent;
